package com.hg.chapter3.condition.condition;

import org.springframework.context.annotation.ConditionContext;

public class OsPojo {
    private String OsName;

    public OsPojo(String osName) {
        OsName = osName;
    }

    public boolean judgeOs(ConditionContext conditionContext) {
        System.out.println(conditionContext.getEnvironment().getProperty("os.name"));
        return conditionContext.getEnvironment().getProperty("os.name").contains(this.OsName);
    }
}
